package com.demo.webapp.kcfinder.config;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Action处理结果配置对象
 * 
 * @author ryuu.kk
 *
 */
public class ResultConfig implements Serializable {

	/**
	 * 版本序列化ID
	 */
	private static final long serialVersionUID = 6147642211895602753L;

	protected String name;
	protected String result;
	protected String type;
	protected final Map<String, String> params;
	
	public ResultConfig(String name, String result, String type) {
		this.name = name;
		this.result = result;
		this.type = type;
		this.params = new HashMap<String, String>();
	}
	
	public ResultConfig(String name, String result, String type, Map<String, String> params) {
		this.name = name;
		this.result = result;
		this.type = type;
		this.params = params;
	}

	public ResultConfig() {
		this.params = new HashMap<String, String>();
	}
	
	public void setName(String name) {
		this.name = name;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public String getResult() {
		return result;
	}

	public String getType() {
		return type;
	}

	public Map<String, String> getParams() {
		return params;
	}
	
	public void addParams(String key, String value) {
		params.put(key, value);
	}
}
